import http from '@/utils/http'
// 加入购物车
export const reqAddCart = ({ goodsId, count, ...data }) => {
  return http.get(`/cart/addToCart/${goodsId}/${count}`, data)
}
// 购物车列表
export const reqCartList = () => {
  return http.get('/cart/getCartList')
}

// 商品状态
export const reqUpdataChecked = (goodsId, isChecked) => {
  return http.get(`/cart/checkCart/${goodsId}/${isChecked}`)
}
// 全选与全不选
export const reqCheckAllCart = (isChecked) => {
  return http.get(`/cart/checkAllCart/${isChecked}`)
}

export const reqDelCart = (goodsId) => {
  return http.get(`/cart/delete/${goodsId}`)
}
